@extends('admin.layout.index')

@section('content')
   <div class="mws-panel-body no-padding">
                    	<form class="mws-form" action="/admin/cate/updata/{{$res['cid']}}" method="post">
                    	{{ csrf_field() }}
                    		<div class="mws-form-inline" style="width:800px;">
                    			<div class="mws-form-row">
                    				<label class="mws-form-label">分类名称</label>
                    				<div class="mws-form-item">
                    					<input type="text" class="small" name="cname" value="{{$res['cname']}}">
                    				</div>
                    			</div>
                    			
                    			<div class="mws-form-row" style="width:500px;">
                    				<label class="mws-form-label">父类名称</label>
                    				<div class="mws-form-item">
                    					<select class="large" name="cpid">
                    						<option>--请选择--</option>
                    						@foreach($data as $k=>$v)
                    						<option value="{{$v['cid']}}" {{$res['cpid'] == $v['cid'] ? 'selected' : ''}}>{{$v['cname']}}</option>
                    						@endforeach
                    					</select>
                    				</div>
                    			</div>
                    			
                    			
                    		</div>
                    		<div class="mws-button-row">
                    			<input type="submit" value="提交" class="btn btn-danger">
                    			<input type="reset" value="重置" class="btn ">
                    		</div>
                    	</form>
                    </div>
@endsection